package org.alanlau.consume.controller;

import org.alanlau.api.feign.SettingClient;
import org.alanlau.api.feign.TestClient;
import org.alanlau.api.feign.form.TestForm;
import org.alanlau.api.feign.vo.TestVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试
 *
 * @author alan
 * @version 1.0
 * @date 2020/9/14 0:42
 */
@RestController
@RequestMapping("/consume")
public class ConsumeTestController {
    @Autowired
    private TestClient testClient;

    @Autowired
    private SettingClient settingClient;

    @GetMapping("/getName")
    public String getName() {
        return testClient.getName();
    }

    @GetMapping("/getInfo")
    public TestVO getInfo(TestForm form) {
        return testClient.getInfo(form);
    }

    @GetMapping("/setting-test")
    public String settingTest() {
        return settingClient.test();
    }
}
